﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class my_pubnews_view : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            TUser.CheckUser(this);

            string articleid = Request["aid"].ToString();

            TCMSArticle.IncPV(articleid);
            TCMSArticle oArticle = new TCMSArticle(articleid);
            oArticle.Select();

            articletitle.InnerHtml = oArticle.Title + "(" + oArticle.PV.ToString() + ")";
            authortime.InnerHtml = oArticle.Author + "&nbsp;" + oArticle.Issue_time.ToString("yy-MM-dd HH:mm");
            acontent.InnerHtml = oArticle.AContent;

            string sTitle = "<script>document.title='" + oArticle.Title + "';</script>";
            ClientScript.RegisterStartupScript(this.GetType(), "scripttitle", sTitle);
        }
    }
}
